package cn.walls1717.wallsmall.product.feign.fallback;

import cn.walls1717.wallsmall.common.utils.R;
import cn.walls1717.wallsmall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import static cn.walls1717.wallsmall.common.exception.BizCodeEnum.TOO_MANY_REQUEST_EXCEPTION;

/**
 * @author walls1717
 * @since 2022/11/28 17:39
 **/
@Slf4j
@Component
public class SeckillFeignServiceFallBack implements SeckillFeignService {
    @Override
    public R getSkuSeckillInfoBySkuId(Long skuId) {
        log.info("--->getSkuSeckillInfoBySkuId熔断方法调用<---");
        return R.error(TOO_MANY_REQUEST_EXCEPTION.getCode(), TOO_MANY_REQUEST_EXCEPTION.getMsg());
    }
}
